package org.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.example.entity.Permissions;

import java.util.List;

public interface PermissionsMapper extends BaseMapper<Permissions> {
    List<Permissions> getPermissions(Integer userId);

    List<Permissions> getPermissionTree(
            @Param("parentId") Integer parentId,
            @Param("userId") Integer userId
    );

    List<Permissions> selectByRolesAndUserId(Integer userId);
}